(gettimeofday): Don't store in *tzp if tzp is 0.
authorRichard M. Stallman <rms@gnu.org>
Sat, 29 May 1993 05:05:40 +0000 (05:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 29 May 1993 05:05:40 +0000 (05:05 +0000)
src/sysdep.c

index 15a0da971907126d76a9a2a61b3fc36d115d61b4..f9390c3c2398693605b1ddc407381cd7e8ec35d0 100644 (file)
@@ -2704,7 +2704,8 @@ gettimeofday (tp, tzp)
 
   tp->tv_sec = time ((long *)0);    
   tp->tv_usec = 0;
-  tzp->tz_minuteswest = -1;
+  if (tzp != 0)
+    tzp->tz_minuteswest = -1;
 }
  
 #endif